Double-Angle Gradients

ABSTRACT

Methods and image processing systems are provided for determining a dominant gradient orientation for a target region within an image. A plurality of gradient samples are determined for the target region, wherein each of the gradient samples represents a variation in pixel values within the target region. The gradient samples are converted into double-angle gradient vectors, and the double-angle gradient vectors are combined so as to determine a dominant gradient orientation for the target region.

BACKGROUND

The present disclosure relates to image processing. In particular, thepresent disclosure relates to a method of determining a dominantgradient orientation for a target region within an image.

Finding the dominant gradient orientation that represents the variationin pixel values in a target region of an image can be useful for anumber of different image processing functions.

Local gradients are typically determined based on differences betweenpairs of pixel values. However, previous approaches for determininglocal gradients do not reliably identify dominant gradient orientations.Three previous approaches are discussed below.

In a first previous approach, an average local gradient angle for atarget pixel can be determined. Considering a kernel of pixelssurrounding a target pixel, a gradient sample for each of thesurrounding pixels is determined by assessing the difference in pixelvalue between the target pixel and each respective surrounding pixel.The gradient samples are then averaged to find a local gradient vectorfor the target pixel. However, when averaged, opposing gradients cancelout—and thus gradient information for thin-line structures can be lost.

In a second previous approach, the magnitude of the gradient samples canbe taken before averaging. This avoids the problem of opposing gradientscancelling out. However, it does so at the expense of losing thedirectional information. That is, this approach outputs a gradientmagnitude, but with no indication as to the direction of the gradient.

In a third previous approach, absolute gradients are measured inmultiple directions separately. For example, a gradient componentparallel to the x axis can be determined as, |g_(x)(x,y)|=|v(x+1,y)−v(x,y)|+|v(x−1,y)−v(x,y)|, and a gradient componentparallel to they axis can be determined as,|g_(y)(x,y)|=|v(x,y+1)−v(x,y)|+|v(x,y−1)−v(x,y)|, where v(x,y)represents an image value at position (x,y). Gradients could becalculated in other directions in this manner (e.g. along 45° angles).In this way some direction information is recovered. However, theangular resolution is reduced to the number of separate directionssampled.

SUMMARY

This summary is provided to introduce a selection of concepts that arefurther described below in the detailed description. This summary is notintended to identify key features or essential features of the claimedsubject matter, nor is it intended to be used to limit the scope of theclaimed subject matter.

According to a first aspect of the disclosure there is provided a methodof determining a dominant gradient orientation for a target regionwithin an image, the method comprising: determining a plurality ofgradient samples for the target region, wherein each of the gradientsamples represents a variation in pixel values within the target region;converting the gradient samples into double-angle gradient vectors;combining the double-angle gradient vectors; and determining a dominantgradient orientation for the target region in dependence on the combineddouble-angle gradient vectors.

The target region may be a region surrounding a target pixel.

Each of the gradient samples may be determined by determining adifference between: (i) the pixel value at the target pixel, and (ii) apixel value of a neighbouring pixel positioned in a respective directionwith respect to the target pixel.

The gradient samples may be in a single-angle domain and thedouble-angle gradient vectors may be in a double-angle domain.

Converting the gradient samples into double-angle gradient vectors maycomprise representing the gradient samples in polar coordinates andmultiplying their angular components by two.

Combining the double-angle gradient vectors may comprise determining acompound gradient vector for the target region.

Determining the dominant gradient orientation for the target region maycomprise converting the compound gradient vector to a dominant gradientvector, the dominant gradient vector representing the dominant gradientorientation for the target region.

The compound gradient vector may be in a double-angle domain andconverting the compound gradient vector to the dominant gradient vectormay comprise converting the compound gradient vector into a single-angledomain.

Converting the compound gradient vector to the dominant gradient vectormay comprise representing the compound gradient vector in polarcoordinates and dividing its angular component by two.

Combining the double-angle gradient vectors may comprise averaging thedouble-angle gradient vectors.

Combining the double-angle gradient vectors may comprise filtering thedouble-angle gradient vectors.

Filtering the double-angle gradient vectors may comprise combining thedouble-angle gradient vectors using a weighted sum.

Each pixel value may comprise one or more characteristics of therespective pixel.

Each characteristic may be one or more of luma, luminance, chrominance,brightness, lightness, hue, saturation, chroma, colourfulness, or anycolour component.

There may be provided a method of steering an anisotropic filter independence on the determined dominant gradient orientation.

The anisotropic filter may use an elliptical filter kernel which has aminor axis and a major axis, and the method may comprise aligning theminor axis of the elliptical filter kernel with the determined dominantgradient orientation.

The method of steering the anisotropic filter may further comprisedetermining the eccentricity of the elliptical filter kernel independence on the magnitude of the compound gradient vector.

According to a second aspect of the present disclosure there is providedan image processing system for determining a dominant gradientorientation for a target region within an image, the image processingsystem comprising: a gradient sampling unit configured to determine aplurality of gradient samples for the target region, wherein each of thegradient samples represents a variation in pixel values within thetarget region; a conversion unit configured to convert the gradientsamples into double-angle gradient vectors; a combining unit configuredto combine the double-angle gradient vectors; and a determining unitconfigured to determine a dominant gradient orientation for the targetregion in dependence on the combined double-angle gradient vectors.

The combining unit may be configured to combine the double-anglegradient vectors by determining a compound gradient vector for thetarget region, and the determining unit may be configured to determinethe dominant gradient orientation for the target region by convertingthe compound gradient vector to a dominant gradient vector, the dominantgradient vector representing the dominant gradient orientation for thetarget region.

The compound gradient vector may be in a double-angle domain and thedetermining unit may be configured to convert the compound gradientvector to the dominant gradient vector by converting the compoundgradient vector into a single-angle domain.

There may be provided an image processing system configured to performthe method as described herein. The image processing system may beembodied in hardware on an integrated circuit. There may be provided amethod of manufacturing, at an integrated circuit manufacturing system,the image processing system, the method comprising: processing, using alayout processing system, a computer readable description of thegraphics processing system so as to generate a circuit layoutdescription of an integrated circuit embodying the image processingsystem; and manufacturing, using an integrated circuit generationsystem, the image processing system according to the circuit layoutdescription. There may be provided an integrated circuit definitiondataset that, when processed in an integrated circuit manufacturingsystem, configures the system to manufacture the image processingsystem. There may be provided a non-transitory computer readable storagemedium having stored thereon a computer readable description of anintegrated circuit that, when processed in an integrated circuitmanufacturing system, causes the integrated circuit manufacturing systemto manufacture the image processing system.

There may be provided an integrated circuit manufacturing systemcomprising: a non-transitory computer readable storage medium havingstored thereon a computer readable integrated circuit description thatdescribes the image processing system; a layout processing systemconfigured to process the integrated circuit description so as togenerate a circuit layout description of an integrated circuit embodyingthe image processing system; and an integrated circuit generation systemconfigured to manufacture the image processing system according to thecircuit layout description.

There may be provided computer program code for performing the method asdescribed herein. There may be provided non-transitory computer readablestorage medium having stored thereon computer readable instructionsthat, when executed at a computer system, cause the computer system toperform the methods as described herein.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is described by way of example with reference tothe accompanying drawings. In the drawings:

FIG. 1 depicts a system for determining the dominant gradientorientation at a pixel position within an image.

FIG. 2a depicts a 3×3 kernel of pixels.

FIG. 2b illustrates an alternative method for selecting sample points.

FIG. 3a is a schematic depicting the conversion of a first gradientsample to a double-angle gradient vector.

FIG. 3b is a schematic depicting the conversion of a second gradientsample to a double-angle gradient vector.

FIG. 4 is a flow diagram illustrating an exemplary method fordetermining a dominant gradient orientation.

FIG. 5 is a schematic depicting the determination of a dominant gradientorientation.

FIG. 6 depicts exemplary conventional average gradient directions anddominant gradient orientations for a thin-line structure.

FIG. 7 depicts exemplary conventional average gradient directions anddominant gradient orientations for a right-angled corner.

FIG. 8 depicts a system for performing a two-stage image filteringprocess.

FIG. 9 depicts an anisotropic sampling filter of the type that can besteered using dominant gradient orientation information.

FIG. 10 depicts idealised dominant gradient orientations for variousstructures.

FIG. 11 compares the results of combining gradient samples using boththe conventional average gradient direction approach and using themethod described herein.

FIG. 12 compares the results of combining gradient sample vectors ofdifferent magnitude using both the conventional average gradientdirection approach and using the method described herein.

FIG. 13 is a schematic diagram of an integrated circuit manufacturingsystem.

DETAILED DESCRIPTION

The following description is presented by way of example to enable aperson skilled in the art to make and use the invention. The presentinvention is not limited to the embodiments described herein and variousmodifications to the disclosed embodiments will be apparent to thoseskilled in the art. Embodiments are described by way of example only.

The present disclosure relates to determining gradient sample vectorsthat represent variations in pixel or sub-pixel data values within atarget region—such as a region surrounding a target pixel or a pluralityof target pixels.

Pixel data as used herein shall refer to any kind of element of imageinformation, including pixel data and sub-pixel data. For example,pixels may be pixels of an image, a video frame, or any otherrepresentation of image information, including pixels of an intermediaterepresentation which may never be presented or stored (which be formedduring image processing or generation of an image in a graphicsprocessing system). Pixels may also represent non-visual information,for example, data in a distance or depth map, or data in a temperaturemap.

FIG. 1 depicts an exemplary system 201 for determining a dominantgradient orientation for a pixel within an image. FIG. 1 comprises agradient sampling unit 202, a conversion unit 203, a combining unit 204and a determining unit 205. The units 202-205 may be implemented insoftware, hardware, firmware or any combination thereof.

Pixel data is provided to the system 201. The pixel data may comprisepixel or sub-pixel image information of all or part of an image or videoframe. The pixel data may represent all of the pixels of an image, or asubset of the pixels of an image. All of, or a subset of, the pixels ofthe input may be processed by the system.

Pixels may represent any data that can be represented in an image-likearray Each pixel of the input image may comprise a pixel value. Eachpixel value may indicate one or more characteristics of the respectivepixel. In some examples, pixel values may be used for visualisation. Forexample, the input may comprise pixel values representing the colour ofobjects in a captured or rendered scene. For example, thecharacteristics indicated by the pixel values may include luma,luminance, chrominance, brightness, lightness, hue, saturation, chroma,colourfulness, or any colour component, such as red, green or bluecolour components. In other examples, the input may comprise any otherpixel values suitable for visualisation (e.g. a temperature map in whichthe pixels may be assigned false-colours in dependence on theirrespective values).

Pixel values may also represent other characteristics. Such pixel valuesmay be primarily intended for processing and/or analysis. For example,pixel values may represent characteristics such as image depth (depthmap), surface normals (normal map), surface texture (albedo map). Insome examples, such pixel data may be derived from an image by arenderer. For example, the input to the system 201 may be a map derivedfrom an image (e.g. by ray tracing). In an example, depth and/ordistance information may be derived using a radar or lidar system, andinput to the system as an image comprising pixel values representing themeasured depths/distances.

Gradient Sampling

Gradient samples represent variation in pixel values within a targetregion. The target region may be a region surrounding a target pixel ora plurality of target pixels.

Gradient samples may be determined by gradient sampling unit 202. Thegradient sampling unit 202 may assess the variation in pixel valueswithin the target region about a target pixel or pixels. Differentgradient samples can be determined in different respective directions.

Considering the target region to be a kernel of pixels surrounding atarget pixel, a gradient sample for each of the surrounding pixels maybe determined by assessing the difference in pixel value between thetarget pixel and each respective surrounding pixel.

For example, in FIG. 2a , a 3×3 kernel of pixels centred on a targetpixel at position (x,y) are considered. In this case, eight neighbouringpixels 303, 304, 305, 306, 307, 308, 309 and 310 surround target pixel302.

In this example, a gradient sample, g, from an image can be determinedby comparing a pixel value of the target pixel, v(x,y), to the pixelvalue for each of the neighbouring pixels, v((x+Δ_(x)), (y+Δ_(y))). Thatis, a gradient sample, g, may be calculated according to:

g=v((x+Δ _(x)),(y+Δ _(y)))−v(x,y)

With the 3×3 kernel shown in FIG. 2 a, Δ _(x),Δ_(y) ∈{−1,0,1}. Eachseparate gradient sample, g, can be written as a vector of the form

${g = {g\begin{bmatrix}{\cos \; \theta} \\{\sin \; \theta}\end{bmatrix}}},$

where g is given by the equation above, and θ=a tan 2 (Δ_(y),Δ_(x)).

In an example, four gradient samples may be determined. For example,gradient samples may be determined for the pixels immediately above,below, left and right of the target pixel. That is, with reference toFIG. 2a , for pixels 304, 306, 307 and 309.

The pixels on the diagonals from a target pixel may additionally oralternatively be considered. For instance, in the example shown in FIG.2a , eight gradient samples may be determined by also considering pixels303, 305, 308 and 310. When determining the gradient samples for pixelson the diagonals from the target pixel, the magnitudes of those gradientsamples on the diagonals may be normalised by multiplication by a factorof

$\frac{1}{\sqrt{2}}$

so as to account for me greater distance between the target pixel andthe surrounding pixel. Generally, a gradient sample may be formed as thedifference between two pixel values, scaled to account for the distancebetween those two pixels.

Gradient samples for a kernel could be determined by assessing thedifference between all combinations of pixel pairs in a kernel. Thisapproach may improve the accuracy of the image processing system byconsidering more information—and therefore lessening the effect ofoutliers, e.g. resulting from noise, on the dataset. However, thisapproach would generally increase the computational load and/or powerrequirements of the image processing system.

Fewer than one gradient sample per pixel position may be determined.That is, it may not be necessary to determine gradient samples for pixelvalues measured at each and every integral pixel location. For example,with reference to FIG. 2b , gradient samples could be determined forsampling points positioned on the circumference of a circle centred onthe target pixel 302. If a sampling point falls between pixel positions,a value for the sampling point may be calculated by interpolating (e.g.bilinearly or bicubicly interpolating) between the pixel values ofnearby (e.g. surrounding) pixels, e.g. by performing bilinearinterpolation of the pixel values of the four nearest pixels to thesampling point. Any suitable sub-pixel sampling technique may be used toform the value of a sampling point lying between pixels. This approachcan advantageously reduce the number of gradient samples to bedetermined, whilst still considering the local gradients with referenceto an evenly distributed selection of points of the input. Bydetermining gradient samples at fewer sample points, this approach maylower the computational load and/or power requirements of an imageprocessing system.

In an example, an image input may be down-sampled prior to gradientsampling. That is, the resolution of input image may first be reduced.For example, an input image may have a high resolution, such as 4K, andprior to gradient sampling the resolution of the image may be reduced toa lower resolution, such as 720p or 480p. In this manner, each pixel ofthe lower resolution image may represent a plurality of pixels of theinput image. This is one example of how gradient samples can bedetermined for a target region. This approach may also lower thecomputational load and/or power requirements of an image processingsystem.

Gradient Sample Conversion

The conversion unit 203 is configured to convert gradient samples todouble-angle gradient vectors.

The double-angle gradient vectors may encode gradient samples with adouble-angle gradient vector that has an angle twice that of thegradient sample.

As stated above, each separate gradient sample, g, can be written as avector of the form

${g = {g\begin{bmatrix}{\cos \; \theta} \\{\sin \; \theta}\end{bmatrix}}},$

where g is given by g=v ((x+Δ_(x)), (y+Δ_(y)))−v(x,y), and θ=a tan 2(Δ_(y),Δ_(x)). Each gradient sample, g, can be converted to adouble-angle gradient vector, g₂, according to:

$g_{2} = {g_{n}\begin{bmatrix}{\cos \mspace{11mu} 2\; \theta} \\{\sin \mspace{11mu} 2\; \theta}\end{bmatrix}}$

where the magnitude of the double-angle vector g₂ has an x component ofg_(2x)=g_(n) cos 2θ, and a y component of g_(2y)=g_(n) sin 2θ, where themagnitude of the double-angle gradient vector g₂ is normalised, bymultiplication by g_(n)=g(Δ_(x) ²+Δ_(y) ²)^(1/2), so as to account forthe distance between the two pixel positions at which the values weresampled.

A gradient sample can be considered to be in the single-angle domain. Adouble-angle gradient vector can be considered to be in the double-angledomain.

Conversion of gradient samples to double-angle gradient vectors can beperformed in any appropriate manner. For example, FIGS. 3a and 3brepresent gradient samples 502 and 505, and double-angle gradientvectors 503 and 506 in polar coordinates. With reference to FIG. 3a , agradient sample 502 which points in the positive Y direction (e.g.(Δ_(x),Δ_(y))=(0,1), such that θ=90°) is converted to a double-anglegradient vector 503 which points in the negative X direction (e.g.(Δ_(x),Δ_(y))=(−1,0), such that 20=180°). With reference to FIG. 3b , agradient sample 505 which points in the negative X direction (e.g.(Δ_(x),Δ_(y))=(−1,0), such that 0=180°), is converted to a double-anglegradient vector 506 which points in the positive X direction (e.g.(Δ_(x),Δ_(y))=(1,0), such that 2θ=360° ≡0°).

Thin-line structures are typically image features that have a width lessthan the width of the kernel used to observe or process them. That is,if a 3×3 kernel of pixels is used during image processing, a thin-linestructure may be any feature having a width of less than three pixels.In an example, a thin-line structure in an image may be a dark linebetween two regions of lighter colour. Opposing gradient samples areoften observed at thin-line structures. This is because the pixel valuegradient typically reduces, or increases, greatly either side of athin-line structure. For example, in the set of gradient samples for atarget pixel on or close to a thin-line structure, there may be pairs ofgradient samples in which each gradient sample has a direction roughlyperpendicular to the thin-line structure, the gradient samples of thepair being at 180° to each other and both having the same or a similarmagnitude. The gradient samples in such a pair of gradient sample may beconsidered to be opposing gradient samples.

In accordance with the method described herein, opposing gradientsamples may be converted to co-directional double-angle gradientvectors. For example, opposing gradient samples may have directions 90°and 270°, such that when they are converted to double-angle gradientvectors, both double-angle gradient vectors have a direction of 180°(270°×2=540°, where 0° ≡360°∴540°−360°=180°) and so are consideredco-directional. One way to express this is to say that if a gradientsample has an angle of ϕ then an opposing gradient sample has an angleof (ϕ+180°). The corresponding double-angle gradient vectors would be 2ϕand (2ϕ+360°)≡2ϕ, i.e. the corresponding double-angle gradient vectorsare codirectional.

Similarly, perpendicular gradient samples are converted to opposingdouble-angle gradient vectors. For example, if a gradient sample has anangle of ϕ then a perpendicular gradient sample may have an angle of(ϕ+90°). The corresponding double-angle gradient vectors would be 2ϕ and(2ϕ+180°), i.e. the corresponding double-angle gradient vectors areopposing.

In this example, the conversion of gradient samples to double-anglegradient vectors is performed by representing gradient samples in polarcoordinates and multiplying their angular components by two.

It will be appreciated that there may be other approaches to convertinggradient samples to double-angle gradient vectors, any of which may beused in accordance with the principles described herein. For example, adistance-normalised, double-angle vector may be pre-computed for each ag_((Δx,Δy)), according to:

$\begin{matrix}{g_{n}\left( {1,0} \right)} & = & {g_{n}\left( {{- 1},0} \right)} & = & {\begin{bmatrix}1 \\0\end{bmatrix},} \\{g_{n}\left( {1,1} \right)} & = & {g_{n}\left( {{- 1},{- 1}} \right)} & = & {{\frac{1}{\sqrt{2}}\begin{bmatrix}0 \\1\end{bmatrix}},} \\{g_{n}\left( {0,1} \right)} & = & {g_{n}\left( {0,{- 1}} \right)} & = & {\begin{bmatrix}{- 1} \\0\end{bmatrix},} \\{g_{n}\left( {{- 1},1} \right)} & = & {g_{n}\left( {1,{- 1}} \right)} & = & {{\frac{1}{\sqrt{2}}\begin{bmatrix}0 \\{- 1}\end{bmatrix}}.}\end{matrix}$

This approach may be used when the number of pixels in the kernel ofpixels is not greater than a pre-determined first threshold, and/or whenthe number of possible directions for each gradient sample is notgreater than a pre-determined second threshold. For example, the firstthreshold may be nine pixels (e.g. a 3×3 kernel) and the secondthreshold may be eight possible directions (e.g. 0° to 360° in 45°intervals, where 0° ≡360°). The distance-normalised, double-anglevectors pre-computed in accordance with this approach may be stored in alook-up table for inspection. The first and second thresholds may be setin dependence on when it is deemed to be more efficient to pre-computeand store all possible double-angle vectors, rather than compute them inreal-time.

Combining Double-Angle Vectors

The double-angle gradient vectors may be combined by the combining unit204 to form a compound gradient vector for the target pixel.

The combining unit 204 may average the double-angle gradient vectorsamples of a kernel so as to determine the compound gradient vector forthe target region. In an example, where two double-angle gradient samplevectors, a g_(2a), g_(2b), have been determined, the compound gradientvector at a target pixel, g′₂, may be calculated according to:

g′ ₂=0.5(g _(2a) +g _(2b)).

The combining unit 204 may filter the double-angle gradient vectorsamples of a kernel so as to determine a compound gradient vector forthe target region. The combining unit 204 may perform linear filteringof double-angle gradient vectors. Linear filtering may combinedouble-angle gradient vectors using a weighted sum. That is, linearfiltering may be any process of the form:

g′ ₂=Σ_(∀i) w _(i) g _(2i),

where w_(i) is a weight for the i^(th) double-angle gradient vectorg_(2i).

Alternatively, the combining unit 204 may perform non-linear filteringto determine the compound gradient vector g′₂ from the double-anglegradient vectors g_(2i).

Opposing gradient samples are often observed at thin-line structures inimages. As has been explained above, opposing gradient samples areconverted to co-directional double-angle gradient vectors. Thus, whenaveraged or filtered, the contributions of these double-angle gradientvector samples do not cancel one another. In contrast, in conventionalgradient sample averaging approaches, opposing gradient samples wouldhave cancelled. In this way, some information about the dominant localgradient an image, e.g. for thin-line structures, that would otherwisehave been lost can be preserved, e.g. information is preserved toindicate that the dominant local gradient is perpendicular to the edgesof a thin line.

In some examples, the magnitude of the gradient samples and/ordouble-angle gradient vectors may be disregarded such that only theirdirectional information is considered during the formation of a compoundgradient vector. For example, after gradient samples for a kernel ofpixels have been determined, each gradient sample having a magnitudebelow a threshold may be discarded. For example, the threshold magnitudemay be a multiple (e.g. 0.5 or 0.75) of the average magnitude of thegradient samples in the kernel. The remaining gradient samples may beassigned unitary magnitude (e.g. each vector is assigned a magnitudeof 1) before conversion to double-angle gradient vectors. Alternatively,all gradient samples for a kernel may be converted to double-anglegradient vectors. In this example, each double-angle gradient vectorhaving a magnitude below a threshold may be discarded. The remainingdouble-angle gradient vectors may be assigned unitary magnitude, beforebeing combined to form a compound gradient vector. This can reduce theprocessing required to form compound gradient vectors.

Determining Dominant Gradient Orientation

The determining unit 205 may determine the dominant gradient orientationfor the target region in dependence on the compound gradient vectors asdescribed below.

The dominant gradient orientation may be determined by converting thecompound gradient vector for a target region into a dominant gradientvector in the single-angle domain. In doing so, the direction of thedominant gradient vector may inherit 180° ambiguity. That is, althoughthe angular orientation of the dominant gradient vector is known, it maynot be known in which of the two opposing directions in that angularorientation the dominant gradient vector is directed. The angularorientation of the dominant gradient vector for a target region,determined as described herein, represents an output dominant gradientorientation for the target region.

For example, a compound gradient vector g′₂ having x and y componentsg_(2x)′ and g_(2y)′ at a target pixel, as determined in the double-angledomain as described above, can be converted to a dominant gradientvector, g₁, in the single-angle domain as follows:

$\quad\begin{matrix}\theta & = & {\frac{1}{2}a\mspace{11mu} \tan \; 2\left( {g_{2\; y}^{\prime},g_{2\; x}^{\prime}} \right)} \\g & = & \sqrt{{g_{2}^{\prime \; T}g_{2}^{\prime}},} \\g_{1} & = & {g\begin{bmatrix}{\cos \; \theta} \\{\sin \; \theta}\end{bmatrix}}\end{matrix}$

where the dominant gradient orientation (θ) at the target pixel position(x,y) may be determined by converting the angular component of thecompound gradient vector into the single-angle domain. For example, thisconversion may be performed by representing the compound gradient vectorin polar coordinates and dividing the angular component by two. It willbe appreciated that there may be other approaches to calculating orapproximating the dominant gradient orientation (θ), any of which may beused in accordance with the principles described herein.

The magnitude of the dominant gradient vector may be calculated orapproximated in any suitable manner. The magnitude (g) of the compoundgradient vectors may remain unchanged and be used as the magnitude ofthe dominant gradient vector. In other examples, the magnitude (g) ofthe compound gradient vector may be halved or modified by some otherfixed constant (e.g. division by √2). As described above, in someexamples the magnitude information is disregarded.

Illustrative Examples

FIG. 4 is a flow diagram illustrating an exemplary method fordetermining a dominant gradient orientation in accordance with theprinciples described herein. Gradient samples are determined 601 for atarget region. The target region may be a region surrounding a targetpixel or a plurality of target pixels. The gradient samples areconverted 602 to double-angle gradient vectors. The double-anglegradient vectors are combined 603, e.g. by averaging or filtering, so asto form a compound gradient vector (in the double-angle domain) for thetarget region. The compound gradient vector for the target region may beconverted to a dominant gradient vector (in the single-angle domain) soas to determine 604 the dominant gradient orientation for the targetregion. The process may be repeated for a plurality of target regions ofthe image. For example, the target region may be a region surrounding atarget pixel, and the process may be repeated for each pixel of theimage.

FIG. 5 is a schematic depicting the determination of a dominant gradientorientation. FIG. 5 depicts vectors in polar coordinates. Gradientsamples 801 and 802 are shown. Gradient samples 801 and 802 mayrepresent gradient samples formed for pixels either side of a targetpixel (e.g. with reference to FIG. 2a , gradient samples for pixels 304and 309 either side of target pixel 302). In this example, only twogradient samples are considered for simplicity.

Gradient samples 801 and 802 are opposing. That is, in FIG. 5, gradientsamples 801 and 802 point in opposite directions and have the samemagnitudes. Gradient sample 801 points in the positive Y-direction (e.g.(Δ_(x),Δ_(y))=(0,1), such that θ=90°). Gradient sample 802 points in thenegative Y-direction (e.g. (Δ_(x),Δ_(y))=(0,−1), such that θ=270°).Opposing gradient samples are often observed about thin-line structureswithin an image. As described herein, thin-line structures are typicallyimage features that have a width less than the width of the kernel.

Gradient samples 801 and 802 are converted 807 in accordance with theprinciples described herein to double-angle gradient vectors 803 and 804respectively. In this example, the angular components of each gradientsample are doubled, whilst their magnitudes remain unchanged.Double-angle gradient vector 803 points in the negative X-direction,i.e. 90°×2=180°. Double-angle gradient vector 804 also points in thenegative X-direction, i.e. 270°×2=540° 180°. Thus, double-angle gradientvectors 803 and 804 are co-directional. In this manner, opposinggradient samples in the single-angle domain have been converted toco-directional double-angle gradient vectors in the double-angle domain.

Double-angle gradient vectors 803 and 804 are combined 809 in accordancewith the principles described herein so as to form a compound gradientvector 805 at the target pixel. In this example, double-angle gradientvectors 803 and 804 have been averaged. Compound gradient vector 805points in the negative X-direction.

Compound gradient vector 805 is converted 810 into the single angledomain so as to form dominant gradient vector 806. Dominant gradientvector 806 is depicted by a double-headed arrow. This is becausedominant gradient vector 806 inherits 180° ambiguity. That is, althoughthe angular orientation of the dominant gradient vector 806 is known, itis not known in which of the two opposing directions in that angularorientation the dominant gradient vector is directed. The angularorientation of the dominant gradient vector 806 at a target pixelrepresents the dominant gradient orientation at the target pixel.

As shown in FIG. 5, double-angle vectors 803 and 804 do not cancel oneanother during combination. Instead, they combine to form compoundgradient vector 805, which is in turn converted to dominant gradientvector 806. Dominant gradient vector 806 can provide information aboutthe local gradient about the target pixel, e.g. regarding a thin-linestructure. In contrast, in conventional approaches gradient samples 801and 802 would have cancelled each other during averaging and informationregarding the local gradient, e.g. regarding a thin-line structure,would have been lost.

FIG. 6 depicts exemplary conventional average gradient directions anddominant gradient orientations determined in accordance with theprinciples defined herein for a thin-line structure.

As described herein, thin-line structures are typically image featuresthat have a width less than the width of a kernel being used to processthe image. In an example, a thin-line structure in an image may be adark line between two regions of lighter colour. FIG. 6 depicts a greyline 403 on a white background. The pixel value gradient considered maybe a colour gradient representing a variation in one or more pixelvalues relating to colour. In this example, the colour gradient eachside of the line may be high. As described herein, opposing gradientsamples are often observed at thin-line structures. This is because thepixel value gradient typically reduces, or increases, greatly eitherside of a thin-line structure—in this example, from grey to white.

In conventional approaches, gradient samples are averaged to find alocal gradient vector for each target region. When averaged, opposinggradients cancel out. Therefore, as depicted on the left-hand-side ofFIG. 6, all information regarding the colour gradient about line 403 maybe lost during this process. This is schematically depicted in FIG. 6 bydots 402—each indicating that no gradient vector exists for the dottedpixel position.

In contrast, by determining dominant gradient orientations in accordancewith the principles described herein, information regarding the colourgradient about line 403 is maintained. As described with reference toFIG. 5, opposing gradient samples can be converted to double-anglegradient vectors which are combined, without cancelling, so as todetermine a dominant gradient vector. The dominant gradient vectors 404may have an orientation that is perpendicular to the longitudinaldirection of the line 403—as depicted on the right-hand-side of FIG. 6.Thus, information regarding the orientation of a thin-line structure maybe preserved.

The method and system for determining dominant gradient orientationsdescribed herein may also have advantages when assessing the pixel valuegradients at corners—as well as thin-line structures.

FIG. 7 depicts exemplary conventional gradient directions and dominantgradient orientations determined in accordance with the principlesdefined herein for a right-angled corner.

FIG. 7 depicts an upper-right-hand portion of a block of colour 405 onwhite background. The block of colour defines a right-angled corner. Thepixel value gradient considered may be a colour gradient representing avariation in one or more pixel values relating to colour. In thisexample, the colour gradients may be high about the border of the blockof colour. Colour gradient samples may be directed perpendicular to eachof the edges delimiting of a block of colour—e.g., in FIG. 7, where thecolour components of the pixel values transition from grey to white.Thus, orthogonal gradient samples are often observed at right-angledcorners.

In some conventional approaches, gradient samples are averaged to find alocal gradient vector for each target region. In an example, whenaveraged, two orthogonal gradients having angular components of 0° and90° output an average gradient direction of 45°. Therefore, as depictedon the left-hand-side of FIG. 7, gradient directions 406 determined in aconventional manner appear to vary smoothly around the right-angledcorner.

In contrast, by determining dominant gradient orientations in accordancewith the principles described herein, orthogonal gradient samples areconverted to opposing double-angle gradient vectors. For example,gradient samples having angular components of 90° and 180° respectivelymay be converted to double-angle gradient vectors having angularcomponents of 180° and 360° (where 0° ≡360°) respectively. Thus, whencombined to form compound gradient vectors 407 in accordance with theprinciples described herein, the double-angle gradient vectors at theright-angled corner will cancel each other. This is schematicallydepicted in FIG. 7 by dots 408—each indicating that no double-anglegradient vector exists for the dotted pixel position. Because of this anabrupt change in the dominant gradient orientation may be observed atthe right-angled corner, as shown on the right-hand side of FIG. 7,rather than an artificially gradual change as is observed usingconventional average gradient directions, as shown on the left-hand sideof FIG. 7.

Two-Stage Image Processing

The method of determining a dominant gradient orientation in an imagedescribed herein may be used as a first stage in a two-stage imageprocessing method.

FIG. 8 depicts a system 1201 for performing a two-stage image processingmethod. System 1201 includes a dominant gradient orientation determiningunit 1202 and an image processing unit 1203. Although not shown,dominant gradient orientation determining unit 1202 may comprise agradient sampling unit 202, a conversion unit 203, a combining unit 204and a determining unit 205 (as depicted by FIG. 1).

Dominant gradient orientation determining unit 1202 may determinedominant gradient orientations for an image in accordance with theprinciples described herein. In an example, dominant gradientorientation determining unit 1202 may output a vector map, or separatemagnitude and orientation maps, representing the dominant gradientorientations determined for the image. In an example, dominant gradientorientation determining unit 1202 may output one or more dominantgradient vectors for a target region in response to a request from imageprocessing unit 1203. For example, the image processing unit may sendsuch a request in advance of processing the target region.

The dominant gradient orientations determined by unit 1202 are passed tothe image processing unit 1203 and are used by the image processing unit1203 to process the image (e.g. to apply filtering to the image). Adominant gradient orientation does not represent the same thing as anaverage gradient. In many situations they will point in the samedirection, but in some situations (such as when thin-line structuresand/or corners are present within a kernel) they will not point in thesame direction. A dominant gradient orientation indicates an orientationof the gradients within a kernel which is dominant even if there areimage structures with different gradients within the kernel. Forexample, a dominant gradient orientation will provide useful informationeven when structures such as thin-lines and corners are present withinthe kernel. In contrast, average (e.g. mean) gradients will notnecessarily provide useful information when structures such asthin-lines and corners are present within the kernel. The dominantgradient orientations determined by the dominant gradient orientationdetermining unit 1202 are 180° ambiguous, but for some operationsperformed by the image processing unit 1203 this is not a problem. Forexample, the image processing unit 1203 may perform some anisotropicoperations on the image based on the dominant gradient orientationswherein the anisotropic operations are not affected by a 180° ambiguity.An example of such an anisotropic operation is anisotropic filtering,which may use an anisotropic filter kernel (e.g. an elliptical filterkernel).

Image processing unit 1203 may perform filtering (e.g. bilateralfiltering), and/or any other known image processing method. Imageprocessing unit 1203 may use the vector map, or one of the separatemagnitude and orientation maps, output by the dominant gradientorientation determining unit 1202 to steer an image filter. Thedetermined dominant gradient orientations may be used to, for example,steer (i.e. orientate) an anisotropic sampling filter—enabling thin-linestructure information to be better preserved during that filtering step.

In an example, image processing unit 1203 comprises a local shapeestimator that uses gradient information to steer an anisotropicsampling filter. For example, as depicted in FIG. 9, an ellipticalsampling filter 101 may be used. The ellipse 106 may represent anasymmetric kernel of pixels.

The size of the kernel used during filtering often determines how smallor thin an object can be resolved during filtering. Thin-line structuresare typically image features that have a width less than the width ofthe kernel being used to filter an image. Thin-line structures aretypically blurred when filtered because the pixel values that define thethin-line structure can be averaged or otherwise combined with otherpixel values within the kernel that neighbour the thin-line structure.The greater the proportion of other pixels that neighbour a thin-linestructure to pixels representing that structure, the more the thin-linestructure may be blurred (because the pixel values defining thethin-line structure contribute proportionately less to the averaged orotherwise combined filtered pixel value output for that kernel).

An elliptical filter 101 may be steered such that the minor axis 102 ofthe ellipse is aligned with the dominant gradient orientation. The axesof the ellipse may be considered to have 180° ambiguity, as representedby double-headed arrows 104, 105, in the same way that the dominantgradient orientation has 180° ambiguity. Steering an asymmetric filterusing dominant gradient information can reduce the blurring of thin-linestructures. As shown in FIG. 6, the dominant gradient orientations for athin-line structure are typically perpendicular to the longitudinaldirection of that structure. That is, in the same direction as thesmallest dimension of the thin-line structure. By aligning the dominantgradient orientation with the minor axis of an elliptical filter—thatis, the axis spanning the fewest pixels—the proportionately highernumber of pixels representing the thin-line structure, compared to otherneighbouring pixels, contribute to the filtered pixel value output forthat kernel. Thus, the blurring of thin-line structures may be reduced.

The major axis 103 of the elliptical filter may be the axis in whichsamples are collected over the largest distance. That is, a greaternumber of pixels may be considered. The major axis of the ellipticalfilter may be aligned with the longitudinal axis of a thin-linestructure, which is typically considerably longer than the width of thethin-line structure. Because of this, the contribution of other pixelvalues that neighbour a thin-line structure in the longitudinaldirection is not such a concern in terms of blurring the thin-linestructure. In this way, the image filtering step can be performed moreefficiently, reducing the computational cost of image processing whilstminimising blurring of thin-line structures—in comparison to usingsmaller, symmetric, kernels.

As described above, the elliptical filter 101 may be oriented based onthe dominant gradient orientation (e.g. such that the minor axis of theellipse is aligned with the dominant gradient orientation). Furthermore,in some examples, the eccentricity of the ellipse 106 may be determinedbased on the magnitude of the dominant gradient vector such that theeccentricity may be increased for gradients with larger magnitudes (e.g.representing thinner lines), and the eccentricity may be decreased forgradients with smaller magnitudes (e.g. representing thicker lines, orareas where there are no line structures present).

Applications for anisotropic sampling filters include edge-preservingnoise reduction filters, and de-mosaicing filters used to reconstructfull colour images from mosaic (colour filter array) images (also knownas de-Bayer in the case of a Bayer colour filter array).

FIG. 10 depicts idealised dominant gradient orientations for variousthin-line structures. The idealised dominant gradient orientations forthese structures may be the ideal orientations in which to steer ananisotropic filter—so as to minimise blurring of these structures. Theidealised dominant gradient orientations are depicted at target pixels702 a, 702 b, 702 c, 702 d and 702 e. FIG. 10a depicts a straight edge.FIG. 10b depicts a 45° intersection of two straight edges. FIG. 10cdepicts a 90° intersection of two straight edges. FIG. 10d depicts a135° intersection of two straight edges. FIG. 10e depicts a 180°intersection of two straight edges, i.e. a thin-line structure.

The method and system for determining dominant gradient orientationsdescribed herein may output dominant gradient orientations that arecloser to the idealised dominant gradient direction than the gradientdirections output by conventional averaging approaches.

FIG. 11 compares the results of combining gradient samples [1 0] and[cos(θ) sin(θ)] over a range of values for θ using both the conventionalaverage gradient direction approach and using the system describedherein. The vector notation here represents [Δ_(x) Δ₃,]. The gradientsample [1 0] points in the positive X-direction. As the θ value overwhich the comparison is performed varies, the direction in which thegradient sample [cos(θ) sin(θ)] points varies. In the conventionalapproach the gradient samples are averaged. In the system describedherein, the gradient samples are first converted to double-anglegradient vectors before combination in accordance with the principlesdescribed herein. When combining gradient samples [1 0] and [cos(θ)sin(θ)] both gradient samples have the same magnitude, and so neithergradient sample can be considered dominant.

FIG. 11a depicts plots representing the angular component of the vectorresulting from a combination of samples [1 0] and [cos(θ) sin(θ)] over arange of 0 using both the conventional average gradient directionapproach 1101 and using the system described herein 1102.

FIG. 11b depicts plots representing the magnitude of the vectorresulting from combination a combination of samples [1 0] and [cos(θ)sin(θ)] over a range of 0 using both the conventional average gradientdirection approach 1111 and using the system described herein 1112. Inan example, when 0=180, [cos(θ) sin(θ)]=[−1 0]. In an example, whenθ=180, gradient samples [1 0] and [cos(θ) sin(θ)] are opposing gradientsamples. As shown in FIG. 11b , when θ=180 the plot for conventionalaverage gradient direction approach 1111 reads a combined vector havinga magnitude of 0. This is because the opposing vectors have cancelled.In contrast, the plot 1112 for the system described herein reads acompound gradient vector having a magnitude of 1.

FIG. 12 compares the results of combining gradient sample vectors ofdifferent magnitude using both the conventional average gradientdirection approach and using the system described herein. In FIG. 12 thevectors considered are [2 0] and [cos(θ) sin(θ)] over a range of valuesfor θ. When combining gradient samples [2 0] and [cos(θ) sin(θ)], thegradient sample [2 0] has a magnitude twice that of [cos(θ) sin(θ)], andso [2 0] can be considered to be dominant. This case is common whenmeasuring gradients close to a corner, but not exactly at the vertex.

FIG. 12a depicts plots representing the angular component of the vectorresulting from a combination of samples [2 0] and [cos(θ) sin(θ)] over arange of 0 using both the conventional average gradient directionapproach 1121 and using the system described herein 1122.

FIG. 12b depicts plots representing the magnitude of the vectorresulting from combination a combination of samples [2 0] and [cos(θ)sin(θ)] over a range of 0 using both the conventional average gradientdirection approach 1131 and using the system described herein 1132.

FIGS. 11 and 12 show that the method described herein approximates theidealised dominant gradients, depicted in FIG. 10, more closely than theconventional averaging gradient direction approach. For example, withreference to FIG. 12, the results of the method described herein deviatefrom the dominant 0° direction by up to 15°, where the conventionalmethod deviates by as much as 30°. The results of the method describedherein show the lowest gradient magnitude when the vectors areperpendicular—that is, when 0=90 and 0=270, therefore [cos(θ) sin(θ)]=[01] or [0−1], both of which are perpendicular to [1 0] (FIG. 11) and [20] (FIG. 12). The result of the conventional approach has the lowestmagnitude where the vectors are opposite directions (e.g. when 0=180, asshown above). As described herein, a structure thinner than the kernelcan give rise to gradient samples in opposite directions. The methoddescribed herein yields a strong gradient result in this case (e.g. at0=180° in FIGS. 11 and 12), but the conventional method shows a lowresponse as it averages out the opposing vectors. As another example, aright-angled corner structure in the kernel can give rise to gradientsamples in perpendicular directions. The method described herein yieldsa weak gradient result in this case (e.g. at 0=90° or at 0=270° in FIGS.11 and 12) because there is not a strongly dominant orientation, whereasthe conventional averaging method shows a fairly strong gradient in thiscase.

Each pixel value may have multiple components. For example, each pixelmay have multiple colour components such as RGB or YUV. Where pixelvalues have more than one component, c, gradient samples may bedetermined for each component separately. The separately determinedgradient samples may then be summed. Alternatively, the gradient samplesfor each of multiple components may first be converted to double-anglegradient vectors, before being summed. The method then proceeds asdescribed herein, in the same manner as for an image with a singlecomponent. Other methods of combining the gradient samples ordouble-angle gradient vectors for multiple colour components may bepossible, e.g. a weighted sum, or sum of squared sample values.

The principles described herein may be applied to any other form ofpixel data, such as Bayer data (in which each pixel position comprises asingle colour value).

The image processing system of FIGS. 1 and 8 are shown as comprising anumber of functional blocks. This is schematic only and is not intendedto define a strict division between different physical or logicalelements of such entities. For example, one or more of the schematicunits 202 to 205 may be provided by a single physical or logicalprocessing entity, and there may be any number of physical or logicalprocessing entities that collectively perform the functions of theschematic units 202 to 205. Each functional block may be provided in anysuitable manner and an image processing system configured in accordancewith the principles set out herein may comprise any number of physicalor logical entities. It is to be understood that intermediate valuesdescribed herein as being formed by an image processing system need notbe physically generated by the image processing system at any point andmay merely represent logical values which conveniently describe theprocessing performed by the image processing system between its inputand output.

The image processing systems described herein may be embodied inhardware on an integrated circuit. The image processing systemsdescribed herein may be configured to perform any of the methodsdescribed herein. Generally, any of the functions, methods, techniquesor components described above can be implemented in software, firmware,hardware (e.g., fixed logic circuitry), or any combination thereof. Theterms “module,” “functionality,” “component”, “element”, “unit”, “block”and “logic” may be used herein to generally represent software,firmware, hardware, or any combination thereof. In the case of asoftware implementation, the module, functionality, component, element,unit, block or logic represents program code that performs the specifiedtasks when executed on a processor. The algorithms and methods describedherein could be performed by one or more processors executing code thatcauses the processor(s) to perform the algorithms/methods. Examples of acomputer-readable storage medium include a random-access memory (RAM),read-only memory (ROM), an optical disc, flash memory, hard disk memory,and other memory devices that may use magnetic, optical, and othertechniques to store instructions or other data and that can be accessedby a machine.

The terms computer program code and computer readable instructions asused herein refer to any kind of executable code for processors,including code expressed in a machine language, an interpreted languageor a scripting language. Executable code includes binary code, machinecode, bytecode, code defining an integrated circuit (such as a hardwaredescription language or netlist), and code expressed in a programminglanguage code such as C, Java or OpenCL. Executable code may be, forexample, any kind of software, firmware, script, module or librarywhich, when suitably executed, processed, interpreted, compiled,executed at a virtual machine or other software environment, cause aprocessor of the computer system at which the executable code issupported to perform the tasks specified by the code.

A processor, computer, or computer system may be any kind of device,machine or dedicated circuit, or collection or portion thereof, withprocessing capability such that it can execute instructions. A processormay be any kind of general purpose or dedicated processor, such as aCPU, GPU, System-on-chip, state machine, media processor, anapplication-specific integrated circuit (ASIC), a programmable logicarray, a field-programmable gate array (FPGA), or the like. A computeror computer system may comprise one or more processors.

It is also intended to encompass software which defines a configurationof hardware as described herein, such as HDL (hardware descriptionlanguage) software, as is used for designing integrated circuits, or forconfiguring programmable chips, to carry out desired functions. That is,there may be provided a computer readable storage medium having encodedthereon computer readable program code in the form of an integratedcircuit definition dataset that when processed in an integrated circuitmanufacturing system configures the system to manufacture an imageprocessing system configured to perform any of the methods describedherein, or to manufacture an image processing system comprising anyapparatus described herein. An integrated circuit definition dataset maybe, for example, an integrated circuit description.

There may be provided a method of manufacturing, at an integratedcircuit manufacturing system, an image processing system as describedherein. There may be provided an integrated circuit definition datasetthat, when processed in an integrated circuit manufacturing system,causes the method of manufacturing an image processing system to beperformed.

An integrated circuit definition dataset may be in the form of computercode, for example as a netlist, code for configuring a programmablechip, as a hardware description language defining an integrated circuitat any level, including as register transfer level (RTL) code, ashigh-level circuit representations such as Verilog or VHDL, and aslow-level circuit representations such as OASIS® and GDSII. Higher levelrepresentations which logically define an integrated circuit (such asRTL) may be processed at a computer system configured for generating amanufacturing definition of an integrated circuit in the context of asoftware environment comprising definitions of circuit elements andrules for combining those elements in order to generate themanufacturing definition of an integrated circuit so defined by therepresentation. As is typically the case with software executing at acomputer system so as to define a machine, one or more intermediate usersteps (e.g. providing commands, variables etc.) may be required in orderfor a computer system configured for generating a manufacturingdefinition of an integrated circuit to execute code defining anintegrated circuit so as to generate the manufacturing definition ofthat integrated circuit.

An example of processing an integrated circuit definition dataset at anintegrated circuit manufacturing system so as to configure the system tomanufacture an image processing system will now be described withrespect to FIG. 13.

FIG. 13 shows an example of an integrated circuit (IC) manufacturingsystem 1002 which is configured to manufacture an image processingsystem as described in any of the examples herein. In particular, the ICmanufacturing system 1002 comprises a layout processing system 1004 andan integrated circuit generation system 1006. The IC manufacturingsystem 1002 is configured to receive an IC definition dataset (e.g.defining an image processing system as described in any of the examplesherein), process the IC definition dataset, and generate an IC accordingto the IC definition dataset (e.g. which embodies an image processingsystem as described in any of the examples herein). The processing ofthe IC definition dataset configures the IC manufacturing system 1002 tomanufacture an integrated circuit embodying an image processing systemas described in any of the examples herein.

The layout processing system 1004 is configured to receive and processthe IC definition dataset to determine a circuit layout. Methods ofdetermining a circuit layout from an IC definition dataset are known inthe art, and for example may involve synthesising RTL code to determinea gate level representation of a circuit to be generated, e.g. in termsof logical components (e.g. NAND, NOR, AND, OR, MUX and FLIP-FLOPcomponents). A circuit layout can be determined from the gate levelrepresentation of the circuit by determining positional information forthe logical components. This may be done automatically or with userinvolvement in order to optimise the circuit layout. When the layoutprocessing system 1004 has determined the circuit layout it may output acircuit layout definition to the IC generation system 1006. A circuitlayout definition may be, for example, a circuit layout description.

The IC generation system 1006 generates an IC according to the circuitlayout definition, as is known in the art. For example, the ICgeneration system 1006 may implement a semiconductor device fabricationprocess to generate the IC, which may involve a multiple-step sequenceof photo lithographic and chemical processing steps during whichelectronic circuits are gradually created on a wafer made ofsemiconducting material. The circuit layout definition may be in theform of a mask which can be used in a lithographic process forgenerating an IC according to the circuit definition. Alternatively, thecircuit layout definition provided to the IC generation system 1006 maybe in the form of computer-readable code which the IC generation system1006 can use to form a suitable mask for use in generating an IC.

The different processes performed by the IC manufacturing system 1002may be implemented all in one location, e.g. by one party.Alternatively, the IC manufacturing system 1002 may be a distributedsystem such that some of the processes may be performed at differentlocations, and may be performed by different parties. For example, someof the stages of: (i) synthesising RTL code representing the ICdefinition dataset to form a gate level representation of a circuit tobe generated, (ii) generating a circuit layout based on the gate levelrepresentation, (iii) forming a mask in accordance with the circuitlayout, and (iv) fabricating an integrated circuit using the mask, maybe performed in different locations and/or by different parties.

In other examples, processing of the integrated circuit definitiondataset at an integrated circuit manufacturing system may configure thesystem to manufacture a image processing system without the ICdefinition dataset being processed so as to determine a circuit layout.For instance, an integrated circuit definition dataset may define theconfiguration of a reconfigurable processor, such as an FPGA, and theprocessing of that dataset may configure an IC manufacturing system togenerate a reconfigurable processor having that defined configuration(e.g. by loading configuration data to the FPGA).

In some embodiments, an integrated circuit manufacturing definitiondataset, when processed in an integrated circuit manufacturing system,may cause an integrated circuit manufacturing system to generate adevice as described herein. For example, the configuration of anintegrated circuit manufacturing system in the manner described abovewith respect to FIG. 13 by an integrated circuit manufacturingdefinition dataset may cause a device as described herein to bemanufactured.

In some examples, an integrated circuit definition dataset could includesoftware which runs on hardware defined at the dataset or in combinationwith hardware defined at the dataset. In the example shown in FIG. 13,the IC generation system may further be configured by an integratedcircuit definition dataset to, on manufacturing an integrated circuit,load firmware onto that integrated circuit in accordance with programcode defined at the integrated circuit definition dataset or otherwiseprovide program code with the integrated circuit for use with theintegrated circuit.

The implementation of concepts set forth in this application in devices,apparatus, modules, and/or systems (as well as in methods implementedherein) may give rise to performance improvements when compared withknown implementations. The performance improvements may include one ormore of increased computational performance, reduced latency, increasedthroughput, and/or reduced power consumption. During manufacture of suchdevices, apparatus, modules, and systems (e.g. in integrated circuits)performance improvements can be traded-off against the physicalimplementation, thereby improving the method of manufacture. Forexample, a performance improvement may be traded against layout area,thereby matching the performance of a known implementation but usingless silicon. This may be done, for example, by reusing functionalblocks in a serialised fashion or sharing functional blocks betweenelements of the devices, apparatus, modules and/or systems. Conversely,concepts set forth in this application that give rise to improvements inthe physical implementation of the devices, apparatus, modules, andsystems (such as reduced silicon area) may be traded for improvedperformance. This may be done, for example, by manufacturing multipleinstances of a module within a predefined area budget.

The applicant hereby discloses in isolation each individual featuredescribed herein and any combination of two or more such features, tothe extent that such features or combinations are capable of beingcarried out based on the present specification as a whole in the lightof the common general knowledge of a person skilled in the art,irrespective of whether such features or combinations of features solveany problems disclosed herein. In view of the foregoing description itwill be evident to a person skilled in the art that variousmodifications may be made within the scope of the invention.

What is claimed is:
 1. A method of determining a dominant gradientorientation for a target region within an image, the method comprising:determining a plurality of gradient samples for the target region,wherein each of the gradient samples represents a variation in pixelvalues within the target region; converting the gradient samples intodouble-angle gradient vectors; combining the double-angle gradientvectors; and determining a dominant gradient orientation for the targetregion in dependence on the combined double-angle gradient vectors. 2.The method of claim 1, wherein the target region is a region surroundinga target pixel.
 3. The method of claim 2, wherein each of the gradientsamples is determined by determining a difference between: (i) the pixelvalue at the target pixel, and (ii) a pixel value of a neighbouringpixel positioned in a respective direction with respect to the targetpixel.
 4. The method of claim 1, wherein the gradient samples are in asingle-angle domain and the double-angle gradient vectors are in adouble-angle domain.
 5. The method of claim 1, wherein converting thegradient samples into double-angle gradient vectors comprisesrepresenting the gradient samples in polar coordinates and multiplyingtheir angular components by two.
 6. The method of claim 1, whereincombining the double-angle gradient vectors comprises determining acompound gradient vector for the target region.
 7. The method of claim6, wherein determining the dominant gradient orientation for the targetregion comprises converting the compound gradient vector to a dominantgradient vector, the dominant gradient vector representing the dominantgradient orientation for the target region.
 8. The method of claim 7,wherein the compound gradient vector is in a double-angle domain andconverting the compound gradient vector to the dominant gradient vectorcomprises converting the compound gradient vector into a single-angledomain.
 9. The method of claim 7, wherein converting the compoundgradient vector to the dominant gradient vector comprises representingthe compound gradient vector in polar coordinates and dividing itsangular component by two.
 10. The method of claim 1, wherein combiningthe double-angle gradient vectors comprises averaging the double-anglegradient vectors.
 11. The method of claim 1, wherein combining thedouble-angle gradient vectors comprises filtering the double-anglegradient vectors.
 12. The method of claim 11, wherein filtering thedouble-angle gradient vectors comprises combining the double-anglegradient vectors using a weighted sum.
 13. The method of claim 1,wherein each pixel value comprises one or more characteristics of therespective pixel.
 14. The method of claim 13, wherein eachcharacteristic is one or more of luma, luminance, chrominance,brightness, lightness, hue, saturation, chroma, colourfulness, or anycolour component.
 15. A method of steering an anisotropic filter, themethod comprising determining a dominant gradient orientation for atarget region within an image by: determining a plurality of gradientsamples for the target region, wherein each of the gradient samplesrepresents a variation in pixel values within the target region;converting the gradient samples into double-angle gradient vectors;combining the double-angle gradient vectors; and determining a dominantgradient orientation for the target region in dependence on the combineddouble-angle gradient vectors; and steering the anisotropic filter independence on the determined dominant gradient orientation.
 16. Themethod of claim 15, wherein the anisotropic filter uses an ellipticalfilter kernel which has a minor axis and a major axis, and the methodcomprises aligning the minor axis of the elliptical filter kernel withthe determined dominant gradient orientation.
 17. The method of claim16, wherein combining the double-angle gradient vectors comprisesdetermining a compound gradient vector for the target region, and themethod further comprising determining the eccentricity of the ellipticalfilter kernel in dependence on the magnitude of the compound gradientvector.
 18. An image processing system for determining a dominantgradient orientation for a target region within an image, the imageprocessing system comprising: a gradient sampling unit configured todetermine a plurality of gradient samples for the target region, whereineach of the gradient samples represents a variation in pixel valueswithin the target region; a conversion unit configured to convert thegradient samples into double-angle gradient vectors; a combining unitconfigured to combine the double-angle gradient vectors; and adetermining unit configured to determine a dominant gradient orientationfor the target region in dependence on the combined double-anglegradient vectors.
 19. The image processing system of claim 18, whereinthe combining unit is configured to combine the double-angle gradientvectors by determining a compound gradient vector for the target region,and wherein the determining unit is configured to determine the dominantgradient orientation for the target region by converting the compoundgradient vector to a dominant gradient vector, the dominant gradientvector representing the dominant gradient orientation for the targetregion.
 20. The image processing system of claim 19, wherein thecompound gradient vector is in a double-angle domain and wherein thedetermining unit is configured to convert the compound gradient vectorto the dominant gradient vector by converting the compound gradientvector into a single-angle domain.